<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><HTML
        xmlns="http://www.w3.org/1999/xhtml"><HEAD><META content="IE=11.0000"
                                                         http-equiv="X-UA-Compatible">

    <META http-equiv="Content-Type" content="text/html; charset=utf-8"> <TITLE>注
        册</TITLE> <LINK href="css/style.css" rel="stylesheet" type="text/css">
    <script src="js/jquery-1.8.3.min.js"></script>
    <SCRIPT>
        $(function () {
            $(".input-button").click(function () {
                if($("#n").val()==""){
                    alert("姓名不能为空");
                }else{
                    if($("#p").val()==""){
                        alert("密码不能为空");
                    }else{
                        if($("#p").val()!=$("#p1").val()){
                            alert("密码不一致")
                        }else{
                        $.ajax({
                            type:"post",
                            url:"add",
                            data:{n:$("#n").val(),
                                p1:$("#p").val()},
                            dataType:"text",
                            success:function (ress) {
                                if(ress=="s"){
                                    alert('失败');
                                }else if(ress=="o"){
                                    alert('成功');
                                    location.href="index";
                                }else{
                                    alert("姓名已被占用")
                                }
                            }
                        })
                    }
                    }
                }
            })
        })
    </SCRIPT>

    <META name="GENERATOR" content="MSHTML 11.00.10586.420"></HEAD>
<BODY>
<DIV class="wrap" id="header"><IMG src="imags/logo.gif"> </DIV>
<DIV class="wrap" id="navbar">
    <DIV class="search"><!--
		<form method="get" action="index.html">
			<input type="text" name="keywords" class="input-text" /><input type="submit" name="submit" class="input-button" value="" />
		</form>
	-->
    </DIV></DIV>
<DIV class="box" id="register">
    <H2>新用户注册</H2>
    <DIV class="content">
        <FORM onsubmit="return check()" action="" method="post">
            <DL>
                <DT>用户名：</DT>
                <DD><INPUT    id="n"  name="userVo.userName" class="input-text"  onblur="findUser(this.value)" type="text"/></DD>
                <DT>密码：</DT>
                <DD><INPUT    id="p"   name="userVo.password" class="input-text"  type="password"/></DD>
                <DT>确认密码：</DT>
                <DD><INPUT    id="p1"   name="userVo.confirmPassword" class="input-text"  type="password"/></DD>
                <DT></DT>
                <DD><INPUT name="submit" class="input-button" type="button" value="提交"/></DD></DL></FORM>
        <DIV class="error"></DIV>
        <DIV class="error"></DIV></DIV></DIV>
<DIV class="wrap" id="footer">北大青鸟 © 版权所有 </DIV></BODY></HTML>
